package com.ibuonline.b2b.entity;

import java.io.Serializable;

public class BaseProvince implements Serializable {

	private static final long serialVersionUID = -1786729543816063056L;

	//fields
	private java.lang.Integer id;
	private java.lang.String name;
	private java.lang.String pinyin;
	private java.lang.String fullName;
	private java.lang.String abbr;
	private java.lang.String region;
	private java.lang.String capital;

	//default constructor
	public BaseProvince() {
	}

	//getter
	public java.lang.Integer getId() {
		return id;
	}
	public java.lang.String getName() {
		return name;
	}
	public java.lang.String getPinyin() {
		return pinyin;
	}
	public java.lang.String getFullName() {
		return fullName;
	}
	public java.lang.String getAbbr() {
		return abbr;
	}
	public java.lang.String getRegion() {
		return region;
	}
	public java.lang.String getCapital() {
		return capital;
	}

	//setter
	public void setId(java.lang.Integer id) {
		this.id = id;
	}
	public void setName(java.lang.String name) {
		this.name = name;
	}
	public void setPinyin(java.lang.String pinyin) {
		this.pinyin = pinyin;
	}
	public void setFullName(java.lang.String fullName) {
		this.fullName = fullName;
	}
	public void setAbbr(java.lang.String abbr) {
		this.abbr = abbr;
	}
	public void setRegion(java.lang.String region) {
		this.region = region;
	}
	public void setCapital(java.lang.String capital) {
		this.capital = capital;
	}

	//equals method
	public boolean equals(Object other) {
		if (this == other)
			return true;
		if (!(other instanceof BaseProvince))
			return false;

		final BaseProvince baseProvince = (BaseProvince)other;
		if (!this.id.equals(baseProvince.getId()))
			return false;

		return true;
	}

	//hashCode method
	public int hashCode() {
		StringBuffer keys = new StringBuffer();
		keys.append(id).append(",");
		if (keys.length() > 0)
			keys.deleteCharAt(keys.length() - 1);
		return keys.toString().hashCode();
	}

	//toString method
	public String toString() {
		return new StringBuilder("BaseProvince[")
			.append("id=").append(id).append(", ")
			.append("name=").append(name).append(", ")
			.append("pinyin=").append(pinyin).append(", ")
			.append("fullName=").append(fullName).append(", ")
			.append("abbr=").append(abbr).append(", ")
			.append("region=").append(region).append(", ")
			.append("capital=").append(capital).append("]").toString();
	}
}